<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:useBean id="othmessage_post1" scope="session" class="software.Mes_function"/>
<%@ page import="java.sql.*" %>  
<%@ page import="java.util.Date;"%>  
<HTML>  
<HEAD>  
<TITLE>message </TITLE>  
</HEAD>  
<BODY>  
<%
request.setCharacterEncoding("UTF-8");
String content1 = request.getParameter("content");
String Id=session.getAttribute("IDsel").toString();
int ID_Use_post=Integer.parseInt(Id);
String IDoth1=session.getAttribute("IDoth").toString();
int  ID_Use_get=Integer.parseInt(IDoth1);
if(content1.length()==0||content1==null)  
out.println("内容不能为空！");  
else  
{   
java.util.Date date=new java.util.Date();  
String datetime=new Timestamp(date.getTime()).toString(); 
othmessage_post1.setTim_Message(datetime);
othmessage_post1.setCon_Message(content1);
othmessage_post1.setId_Use_Post(ID_Use_post);
othmessage_post1.setId_Use_Get(ID_Use_get);
othmessage_post1.Mes_insert();
out.print("<script>alert('留言成功！ ');</script>");
  %>
  <script type="text/javascript">
        window.location.href="othhome_main.jsp?mk=1";    
   </script>
<%
}
%>   
</body>  
</html>  